export default {
  data() {
    return {
      homedata: [],
      isCollapse: false,
      iconList: ['icon-users', 'icon-tijikongjian', 'icon-shangpin', 'icon-danju', 'icon-baobiao']
    }
  },
  created() {
    this.getHomeData()
  },
  methods: {
    logout() {
      sessionStorage.removeItem('token')
      // 编程式跳转
      this.$router.push('/login')
    },
    async getHomeData() {
      const { data: res } = await this.$http.get('menus')
      this.homedata = res.data
    }
  }
}
